<template>
    <div class="row best-deal-active">
            <div v-for="hot in hotGoodsList" :key="hot.id" class="col-xl-3">
                <div class="best-deal-item">
                    <div class="best-deal-thumb">
                        <router-link 
                         :to="{
                            name:'goodsdetail',
                            params:{
                                goodstype:hot.goodstype,
                                goodsid:hot.goodsid,
                                goodsname:hot.goodsname
                            }
                             }"> 
                             <img :src="hot.img" alt=""  ></router-link>
                    </div>
                    <div class="best-deal-content">
                        <div class="main-content">
                            <div class="rating">
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                                <i class="fas fa-star"></i>
                            </div>
                            <h4 class="title">
                                <router-link  
                                 :to="{
                                        name:'goodsdetail',
                                        params:{
                                            goodstype:hot.goodstype,
                                            goodsid:hot.goodsid,
                                            goodsname:hot.goodsname
                                        }
                             }">{{ hot.goodsname}}</router-link></h4>
                            <p >{{ hot.price+'元/kg' }}</p>
                        </div>
                        <div class="icon"><a href="shop-details.html" title="加入购物车">+</a></div>
                    </div>
                </div>
            </div>
    
        </div>
</template>

<script>
import Mock from 'mockjs'
export default {
    data() {
        return {
            hotGoodsList:[
                {goodstype:'dairymeat',goodsid:Mock.mock('@id'),goodsname:Mock.mock('@cword(10)'),img:'img/product/best_deal_product01.png',price:100},
                {goodstype:'dairymeat',goodsid:Mock.mock('@id'),goodsname:Mock.mock('@cword(10)'),img:'img/product/best_deal_product02.png',price:100},
                {goodstype:'dairymeat',goodsid:Mock.mock('@id'),goodsname:Mock.mock('@cword(10)'),img:'img/product/best_deal_product03.png',price:100},
                {goodstype:'dairymeat',goodsid:Mock.mock('@id'),goodsname:Mock.mock('@cword(10)'),img:'img/product/best_deal_product04.png',price:100},
                {goodstype:'dairymeat',goodsid:Mock.mock('@id'),goodsname:Mock.mock('@cword(10)'),img:'img/product/best_deal_product05.png',price:100},
            ]
        }
    },
    methods: {
     
    },
}
</script>

<style>

</style>